﻿@model WineStore.Models.FileListingViewModel

@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <title>Add</title>
    <script src="../../Scripts/jquery-1.5.1.min.js" type="text/javascript"></script>

    <script type="text/javascript">
        $(function () {
            $('a').click(function (e) {
                e.preventDefault();
                var ckEditorNum = parseInt($('#CKEditorFuncNum').val());
                window.opener.CKEDITOR.tools.callFunction(ckEditorNum, '/Content/Images/Upload/' + $(this).attr('href'), '');
                window.close();
            });
        });
    </script>
</head>
<body>
    <div>
        Images Upload<br /><br />
        @foreach (var item in Model.Files)
        {
            
            <a href="@item.FileName" style="font-size: larger; float:left; margin:10px;"><img width="200px" height="200px;" src="../Content/Images/Upload/@item.FileName"/></a>            
            
        }
        <br /><br />
        @Html.HiddenFor(m => m.CKEditorFuncNum)
    </div>
</body>
</html>
